package day6zy;

import java.util.Scanner;

public class Day6zy5 {
    String yh="dawn";
    String mm="123456";
    public void gx(){
        System.out.println("请输入旧的用户名：");
        Scanner in = new Scanner(System.in);
        String jyhm = in.next();
        System.out.println("请输入旧的密码：");
        String jmm = in.next();
        if (jyhm.equals(yh)&&jmm.equals(mm)){
            System.out.println("有权限");
            System.out.println("请输入新的密码：");
            Scanner inn = new Scanner(System.in);
             mm = inn.next();
            System.out.println("新密码为："+mm);
        }else {
            System.out.println("输入错误");
        }
    }
}
class gly extends Day6zy5{
    public static void main(String[] args) {
        gly gl = new gly();
        gl.gx();
    }
}
